package com.zxy.lm.mapper;

import com.zxy.lm.DO.BorrowRecordDO;
import com.zxy.lm.entity.BorrowRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jiusi
 * @since 2021-06-22
 */
@Mapper
public interface BorrowRecordMapper extends BaseMapper<BorrowRecord> {

    LocalDateTime selectLastReturnTime(Integer userId);

    List<BorrowRecordDO> selectAllRecordDOByUserId(Integer userId);

    int getBookIdById(Integer recordId);

    LocalDateTime selectReturnTime(Integer recordId);

    String selectRecordUsernameById(Integer recordId);
}
